<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        html,body{
            width: 100%;
        }
        div{
            /*通过设置display: flex，把他转成弹性盒布局方式*/
            display: flex;
            width: 100%;
            height: 500px;

        }
        span{
            display: inline-block;
            flex-grow: 1;
            flex-shrink: 1;
            height: 100px;
            background-color: yellow;
        }
        .box2{
            width: 200px;
            /*
            flex-shrink:设定缩小的比例，如果采取1，则等比例的缩小
            如果采用0，意思就是不缩小

            */
            background-color: red;
            flex-shrink: 0;
        }

    </style>
</head>
<body>
<div>
    <span>第一个</span>
    <span class="box2">第二个</span>
    <span>第三个</span>
</div>
</body>
</html>